The present application describes systems and techniques relating to electronic document layout, for example, traversing a hierarchical layout template.
In the publishing field, various techniques are used to improve the page layout process. Page layout involves creating a visual presentation with appropriate formatting for a document given input content for the document. For example, a FrameMaster Page is a standard HTML (Hyper Text Markup Language) file that contains code for managing control parameters of a Web page layout. Example control parameters include parameters that control screen width percentage, shape of a footnote region, resizability, and scroll bars.
Additionally, various layout templates may be created using existing software products. A layout template describes available layout structures for a page layout, such as a graphics frame that specifies where a picture goes on a page. QuarkXPress™ and InDesign® are both example software products, available from Adobe Systems Incorporated of San Jose, Calif., that enable creation of layout templates. Typical layout templates can expect certain types of content and leave holes in the page layout if the expected content is not present.
Interscript is a specification that enables creation of flexible layout templates. The Interscript Specification was originally developed and available from Xerox Corporation of Stamford, Conn. At a first level, Interscript is a document interchange encoding that has a simple syntax and semantics that can be interpreted readily, even by low-capability editors. Interscript is a basic document description language with a small core and an extension-by-definition facility that allows creation of dynamic layout templates.
An Interscript template is an example of a hierarchical layout template that describes possible layout strictures and potential aspects of a layout. The final page layout created from an Interscript template can be made to depend on the content that is poured into the template; thus, holes need not be left in the page layout when certain expected content is not present. Moreover, Interscipt enables creation of hierarchical layout templates that can include features for improved layout scaling and can include layout penalties for improved layout selection (e.g., a columned document template may have a penalty on the height of the box containing the columns, thereby balancing the columns on a half-full page).